<!--
 * Tencent is pleased to support the open source community by making 蓝鲸 available.
 * Copyright (C) 2017-2022 THL A29 Limited, a Tencent company. All rights reserved.
 * Licensed under the MIT License (the "License"); you may not use this file except
 * in compliance with the License. You may obtain a copy of the License at
 * http://opensource.org/licenses/MIT
 * Unless required by applicable law or agreed to in writing, software distributed under
 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied. See the License for the specific language governing permissions and
 * limitations under the License.
-->

<!DOCTYPE html>
<html>
<head>
    <head>
        <meta charset="utf-8">
        <title>CMDB 403</title>
        <link rel="shortcut icon" href="./static/favicon.ico" type="image/x-icon">
        <style>
            html,body {
                height: 100%;
                font-family: "PingFang SC","Microsoft YaHei";
                font-size: 14px;
            }
            * {
                padding: 0;
                margin: 0;
                box-sizing: border-box;
            }
            .page403 {
                display: flex;
                align-items: center;
                justify-content: center;
                flex-direction: column;
                width: 100%;
                height: 100%;
                margin-top: -60px;
            }
            .page403-image {
                display: flex;
                align-items: center;
            }
            .exception-img {
                object-fit: contain;
                display: block;
                height: 200px;
                vertical-align: middle;
            }
            .page403-content {
                color: #63656e;
                text-align: center;
            }
            .page403-title {
                font-size: 24px;
                font-weight: normal;
            }
            .page403-subtitle {
                color: #979ba5;
                font-size: 14px;
                text-align: center;
                margin-top: 14px;
            }
        </style>
    </head>
</head>
<body>
    <div class="page403">
        <div class="page403-image">
            <img src="" alt="403" class="exception-img">
        </div>
        <div class="page403-content">
            <h2 class="page403-title" id="page403Title"></h2>
            <div class="page403-subtitle">{{.message}}</div>
        </div>
    </div>
    <script>
        const langCookieValue = document.cookie
            .split("; ")
            .find((row) => row.startsWith("blueking_language="))
            ?.split("=")[1];
        const titleI18n = {
            en: 'No access permission for this application.',
            'zh-cn': '无该应用访问权限'
        }
        document.getElementById('page403Title').textContent = titleI18n[langCookieValue || 'zh-cn']
    </script>
</body>
</html>
